package com.ITArmy.dao;

import com.ITArmy.beans.Chapter;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ChapterMapper {
    int deleteByPrimaryKey(Long chId);

    int insert(Chapter record);

    int insertSelective(Chapter record);

    Chapter selectByPrimaryKey(Long chId);

    int updateByPrimaryKeySelective(Chapter record);

    int updateByPrimaryKey(Chapter record);

    //根据连载表的id获取所有的章节(查)

    List<Chapter> selectBySerializeIdsss(long serializeId);

    //根据连载连载id，和章节id删除指定的章节（删）

    int deleteByTwoId(@Param("serializeId") long serializeId, @Param("chapterId") long chapterId);

    Character getChapterByChid(long chid);

    //根据连载的id进行删除所有的章节

    int deleteAllChapter(long serializeId);

    //查询是否已经发表过该章节(根据连载id和第几个章节)

    List<Chapter> findChapter(@Param("ch_number")int ch_number, @Param("s_id")long s_id);

}